package ParcialMultiMat;
import java.util.Scanner;

public class Multiplicacion {
private static double A[][] = new  double[2][3];
private static double B[][] = new  double[3][2];
private static double C[][] = new  double[2][2];
private static Multiplicacion clase = new Multiplicacion();
private static Scanner leer = new Scanner(System.in);
	public static void main(String[] args) {
		
		clase.llenar(A,2,3);
		clase.llenar(B,3,2);
		clase.multiplicar();

	}
	private void multiplicar() {
		
		for(int i =0;i<2;i++){
			for(int j=0;j<2;j++){
				for(int l=0;l<3;l++){
					C[i][j]+=A[i][l]*B[l][j];
				}
			}
		}
		imprimir(C,2,2);
		
	}
	private static void llenar(double mat[][],int f, int c){
		
		for(int F=0;F<f;F++){
			for(int C=0;C<c;C++){
				System.out.println("ingrese dato fila "+F+" Columna "+C);
				mat[F][C]=leer.nextDouble();
			}
		}
		imprimir(mat,f,c);
		
	}
	private static void imprimir(double[][] mat, int f, int c) {
		System.out.println("_________________________");
		for(int F=0;F<f;F++){
			for(int C=0;C<c;C++){
				System.out.print(mat[F][C]+" ");
				
			}
			System.out.println();
		}
		System.out.println("_________________________");
		
	}
}
